using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace DblogStudio.DAL.Models.Mapping
{
    public class NhatKyHoatDongMap : EntityTypeConfiguration<NhatKyHoatDong>
    {
        public NhatKyHoatDongMap()
        {
            // Khoá chính
            this.HasKey(t => t.MaNhatKyGUID);

            // Các cột
            this.Property(t => t.LoaiThaoTac)
                .IsRequired().HasColumnName("LoaiThaoTac");
            this.Property(t => t.LoaiDoiTuong)
                .IsRequired().HasColumnName("LoaiDoiTuong");
            this.Property(t => t.MaDoiTuong)
                .IsRequired().HasColumnName("MaDoiTuong");
            this.Property(t => t.DuLieuCuXML)
                .HasColumnName("DuLieuCuXML");
            this.Property(t => t.DuLieuMoiXML)
                .HasColumnName("DuLieuMoiXML");
            this.Property(t => t.ThoiGianGhiNhan)
                .IsRequired().HasColumnName("ThoiGianGhiNhan");
            this.Property(t => t.MaNguoiThucHien)
                .IsRequired().HasMaxLength(50).HasColumnName("MaNguoiThucHien");

            this.ToTable("NhatKyHoatDong");
        }
    }
}
